# Maintainer: Bruno Pagani <archange@archlinux.org>
# Contributor: Eli Schwartz <eschwartz@archlinux.org>
# Contributor: Alexandre Filgueria <alexfilgueira@antergos.com>
# Contributor: Jan de Groot <jan@archlinux.org>

pkgname=cinnamon-desktop
pkgver=6.0.0
pkgrel=1
pkgdesc="Library with common API for various Cinnamon modules"
arch=(loong64 x86_64)
url="https://github.com/linuxmint/${pkgname}"
license=(GPL LGPL)
depends=(accountsservice gtk3 libxkbfile libpulse)
makedepends=(meson samurai gobject-introspection intltool)
source=(${url}/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz
        config.patch)
sha256sums=('17473083758acac9ca580849c88a2ac4bcc2fe715ee232fbecfa0baf2204bbb5'
            'e70227c64eca6857fe9adc21c6aee851df40b3a54bf34a145e0dc4b9819a7b6a')
b2sums=('908b53445327cdbb5560655700e6dfa829934714167f02dda2d9d31a02ae85fcf6565704e791f67f0725e9eb76ed65ef26944d3fac2a58e3091b2afd10bb70af'
        '5ae28fca1f3fee35222569afdba3f6f2df00f2b27709d1135589f33a3b80546ca541c391f5ee02759467fcaffe380dc1cbc4117dffe3c10cdf7046fd8588e384')

prepare() {
  cd ${pkgname}-${pkgver}
  # Adjust configuration
  patch -p1 < ../config.patch
  mkdir -p build
}

build() {
  cd ${pkgname}-${pkgver}/build
  arch-meson ..
  samu
}

package() {
  cd ${pkgname}-${pkgver}/build
  DESTDIR="${pkgdir}" samu install
}
